home *** CD-ROM | disk | FTP | other *** search
/ Software Vault: The Gold Collection / Software Vault - The Gold Collection (American Databankers) (1993).ISO / cdr53 / pctv4n_1.zip / CHILD.H < prev    next >
C/C++ Source or Header  |  1993-06-10  |  1KB  |  43 lines

  1. // child.h -- TChildWindow class declaration
  2.  
  3. #include <commdlg.h>
  4. #include <owl.h>
  5. #include <stdio.h>
  6. #include <stdlib.h>
  7. #include <string.h>
  8. #include <strng.h>
  9. #include <array.h>
  10. #include "wlist.rch"
  11.  
  12. #define BUFSIZE 256  // Filename buffer size
  13.  
  14. // The MDI child window class (individual "document" windows)
  15. class TChildWindow: public TWindow {
  16. public:
  17.   TChildWindow(PTWindowsObject AParent, LPSTR fName);
  18.   ~TChildWindow()
  19.     { if (hFont != NULL) DeleteObject(hFont); }
  20.   virtual void SetupWindow();
  21.   int ReadFile();
  22.   void AdjustSettings();
  23.   void AdjustScroller();
  24.   virtual void CMFontSelect(RTMessage Msg)
  25.     = [CM_FIRST + CM_FONTSELECT];
  26.   virtual void WMSize(RTMessage)
  27.     = [WM_FIRST + WM_SIZE];
  28.   virtual void WMKeyDown(RTMessage)
  29.     = [WM_FIRST + WM_KEYDOWN];
  30.   virtual void Paint(HDC PaintDC, PAINTSTRUCT &PaintInfo);
  31. private:
  32.   Array text;               // Array of string objects
  33.   LOGFONT font;             // Logical font
  34.   HFONT hFont;              // Font handle
  35.   COLORREF fontColor;       // Font color
  36.   int fontPointSize;        // Font size in points
  37.   long width, height;       // Size of window in display units
  38.   int numRows, numCols;     // Number of text file rows and cols
  39.   int rowSep, colSep;       // Units separation between chars
  40.   int glyphW, glyphH;       // Character glyph width and height
  41.   char fileName[BUFSIZE];   // Text filename
  42. };
  43.